Skip to content

[SYCL] Replace direct builtins-side multi_ptr usage with forward-declaration#21687

Open
koparasy wants to merge 4 commits intointel:syclfrom
koparasy:compile-time/remove-multi-ptr-from-builtins
Open

[SYCL] Replace direct builtins-side multi_ptr usage with forward-declaration#21687
koparasy wants to merge 4 commits intointel:syclfrom
koparasy:compile-time/remove-multi-ptr-from-builtins

Conversation

@koparasy
Copy link
Copy Markdown
Contributor

@koparasy koparasy commented Apr 6, 2026

sycl/builtins.hpp> no longer needs to include the full <sycl/multi_ptr.hpp> definition. Preserve multi_ptr builtin behavior once multi_ptr.hpp is included, and update include-deps / regression coverage.

On a TU including only <sycl/builtins.hpp> we observe 3.5% reduction for host compilation and 21.7% reduction for device compilation.

koparasy added 2 commits April 6, 2026 09:24
…lper

customization points so <sycl/builtins.hpp> no longer needs to include the
full <sycl/multi_ptr.hpp> definition. Preserve multi_ptr builtin behavior once
multi_ptr.hpp is included, and update include-deps / regression coverage.

On a TU including only <sycl/builtins.hpp> we observe 3.5% reduction for host compilation and 21.7% reduction for
device compilation.
@koparasy koparasy requested a review from a team as a code owner April 6, 2026 17:13
@koparasy koparasy requested a review from slawekptak April 6, 2026 17:13
@koparasy koparasy changed the title Replace direct builtins-side multi_ptr usage with forward-declaration [SYCL] Replace direct builtins-side multi_ptr usage with forward-declaration Apr 6, 2026
@koparasy
Copy link
Copy Markdown
Contributor Author

koparasy commented Apr 7, 2026

PR Note (Breaking Change Awareness)

This change removes a transitive include of sycl/multi_ptr.hppfromsycl/builtins.hpp`.

As a result, code that previously relied on including sycl/builtins.hpp to implicitly obtain the definition of multi_ptr may no longer compile. Such usage was relying on an implementation detail rather than an explicit dependency.

Impact:

Source-breaking for applications that depend on transitive inclusion of multi_ptr.
No functional/runtime behavior changes.

Recommended fix for users:

Explicitly include sycl/multi_ptr.hpp where multi_ptr is used.
#include <sycl/multi_ptr.hpp>

Question for reviewers:

Should we:
(a) Treat this as an acceptable cleanup (users fix includes)
(b) Any suggestions?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant